<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue.js学习</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>   <!--引入vue.js-->
</head>
<body>
    <div id="xue">
        <h3>《xx从入门到放弃》</h3>
        <div v-if="exist">各类书籍</div>
        <ol>
            <li v-for="book in books">{{book.title}} / {{book.price}}元</li>
        </ol>
    </div>
    <script>
        var xue = new Vue({
            el: '#xue',
            data: {
                exist: false,  //true false  都可以尝试一下
                books: [
                    {title:'PHP分布式',price:40},
                    {title:'python黑科技',price:54},
                    {title:'android开发入门',price:50},
                ],
            },
        });
    </script>
</body>
</html>